package com.wkbb.common.enums;

/**
 * @author dengjingyuan
 * @date 2019-09-02 11:35
 */
public enum CosFileTypeEnum {

    /**
     * 考勤
     */
    ATTENDTYPE(1,"attend"),
    /**
     * 基础
     */
    BASICTYPE(2,"basic"),
    /**
     * 设备
     */
    DEVICETYPE(3,"device"),

    /**
     * 动态
     */
    DYNAMICTYPE(4,"dynamic"),

    /**
     * 人脸
     */
    FACETYPE(5,"face"),
    /**
     * IM
     */
    IMTYPE(6,"im"),
    /**
     * 生活
     */
    LIVETYPE(7,"live"),
    /**
     * 小程序
     */
    MINIPROGRAMTYPE(8,"miniprogram");


    private CosFileTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (CosFileTypeEnum cosFileTypeEnum : CosFileTypeEnum.values()) {
            if (cosFileTypeEnum.getValue().intValue()==value) {
                return cosFileTypeEnum.getDesc();
            }
        }
        return null;
    }
}
